lvm2: disable readline and interactive shell
authorMaxim Storchak <[email protected]>
Thu, 25 Sep 2025 09:38:21 +0000 (12:38 +0300)
committerDaniel Golle <[email protected]>
Thu, 25 Sep 2025 11:54:52 +0000 (12:54 +0100)
remove support of interactive mode in /sbin/lvm

Benefits:
- drop dependency on readline and ncurses (-700kb if there are no other users of these libs)
- shrink the lvm binary itself (-260k)

Drawback:
- lose interactive shell:
lvm> vgchange -ay
  4 logical volume(s) in volume group "vg0" now active
lvm>

"lvm <subcommand> --params" and "<subcommand> --params" entry points are still available

Signed-off-by: Maxim Storchak <[email protected]>
utils/lvm2/Makefile

index d3aabc33226fd5a62d99d5e4e2bfcd41f767bce1..ef62eb5676b41cf80e986f6773451b71f5b197df 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=LVM2
 PKG_VERSION:=2.03.33
 PKG_VERSION_DM:=1.02.207
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2 \
@@ -68,7 +68,7 @@ define Package/lvm2/default
   SUBMENU:=Disc
   TITLE:=The Linux Logical Volume Manager
   URL:=https://sourceware.org/lvm2/
-  DEPENDS:=+libreadline +libncurses +libaio
+  DEPENDS:=+libaio
 endef
 
 define Package/lvm2
@@ -104,6 +104,8 @@ CONFIGURE_ARGS += \
        --with-default-run-dir=/var/run/lvm \
        --with-default-locking-dir=/var/lock/lvm \
        --without-libnvme \
+       --disable-readline \
+       --disable-libedit \
        --$(if $(findstring selinux,$(BUILD_VARIANT)),en,dis)able-selinux
 
 ifneq ($(shell /bin/sh -c "echo -n 'X'"),X)